import request from "../../utils/request/request";

// /*
//     *fzy
//     *根据区域id查询服务列表(分页)
//     */
export function findAll(data){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/getServeListByRegionId',
    method: 'post',
    data,
  })
}

// 根据id删除（逻辑删除）
export function deleteById(data){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/deleteById',
    method: 'get',
    params:{
      id:data
    },
  })
}
// 根据服务id设置热门/取消热门
export function setHot(data){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/setHot',
    method: 'get',
    params:{
      id:data
    },
  })
}
// 根据服务id设置上架/下架
export function setSaleStatus(data){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/setSaleStatus',
    method: 'get',
    params:{
      id:data
    },
  })
}
// 查看所有的服务类型
export function typeList(){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/typeList',
    method: 'get'
  })
}
// 根据服务类型的id查询所有的服务项
export function serveItemListByTypeId(serveTypeId){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/serveItemListByTypeId',
    method: 'get',
    params:{
      serveTypeId:serveTypeId
    }
  })
}
// 添加服务
export function saveServe(data){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/saveServe',
    method: 'post',
    data,
  })
}
   // 修改区间价格
export function updatePrice(data){
  return request({
    url: 'http://localhost:9999/jeccg-regionalServices/serve/updatePrice',
    method: 'post',
    data,
  })
}
